<!doctype html>
<html lang="en">
<head>
    @include('web.layout.head')
    <link rel="stylesheet" href="{{mix('/css/web/user/matching.css')}}">
</head>
<body>
@include('web.layout.header')
<div class="base_member_content">
    <div class="w1200">
        <div class="buyer_matching_mian">
            <div class="buyer_matching_mian_tit">配货单</div>
            <div class="buyer_offer_main fl">
                <span class="fl">配单号：{{$data['item_code']}}</span>
                <span class="fr">配单时间：{{date('Y/m/d H:i:s',strtotime($data['created_at']))}}</span>
            </div>
            <div class="buyer_matching_info fl">
                <div class="tit fl"><span>购买方</span></div>
                <div class="buyer_matching_info_center fl">
                    <span>收货人姓名：{{$data['buyer_contact']}}</span>
                    <span>电         话：{{$data['buyer_phone']}}</span>
                    <span>配 货 地 址：{{$data['project_addr']}}</span>
                    <span>备         注：{{in_array(1,$data['quote_contain'])?'包含票税':''}}    {{in_array(2,$data['quote_contain'])?'包含运费':''}}    {{in_array(3,$data['quote_contain'])?'包含安装':''}}    {{in_array(4,$data['quote_contain'])?'包含公报总价':''}}</span>
                </div>
                <div class="tit fl"><span>销售方</span></div>
                <div class="buyer_matching_info_center fl">
                    <span>公      司：{{$data['seller_company']}}</span>
                    <span>电联系方式：{{$data['seller_phone']}}</span>
                    <span>销售专员：{{$data['seller_contact']}}</span>
                    <span>公司地址：{{$data['seller_company_addr']['company_address']}}</span>
                </div>
            </div>
            <div class="table">
                <table>
                    <thead>
                    <tr>
                        <th width="40">序号</th>
                        <th width="240">品名</th>
                        <th width="140">品牌</th>
                        <th width="200">型号</th>
                        <th width="120">数量</th>
                        <th width="120">单价（元）</th>
                        <th width="120">合计（元）</th>
                    </tr>
                    </thead>
                    <tbody>
                    @if(isset($data['items_products']) && !empty($data['items_products']))
                        @foreach($data['items_products'] as $k=>$v)
                        <tr>
                            <td>{{$k+1}}</td>
                            <td>{{$v['product_name']}}</td>
                            <td>{{$v['brand']}}</td>
                            <td>{{$v['model']}}</td>
                            <td>{{$v['num']}}</td>
                            <td><font>{{$v['price']}}</font></td>
                            <td>{{$v['total_price']}}</td>
                        </tr>
                        @endforeach
                    @endif

                    </tbody>
                </table>
                <div class="heji">合计：<font>{{$data['all_total']}}元</font></div>
            </div>
            <div class="tishi1">非常感谢您在e井在线(www.ejing365.com)配置清单，由线下服务商{{$data['seller_company']}}提供支持。</div>
            <div class="tishi2">400-016-6889</div>
        </div>
        <div class="generating_sheet_main fl">
            @if($data['orders']['order_status']==1)
                <input type="button" class="tijiao" value="直接下单" data-id="{{$data['orders']['id']}}">
            @endif
            <a href="{{url('/member/buyer/items')}}" class="back">返回</a>

        </div>
    </div>
</div>
<div class="bg_h"></div>
<div class="account_box">
    <div class="h_top">
        <h2>配单信息反馈</h2>
        <a>×</a>
    </div>
    <textarea></textarea>
    <div class="btn_box">
        <div class="btn_confirm fr">确定</div>
    </div>
</div>
@include('web.layout.footer')
<script type="text/javascript">

    $(function(){
        var id = '';
        $(".feedback_btn").on('click', function(event) {
            id = $(this).data('id');
            $('.bg_h').show();
            $('.account_box').show();
        })
        $(".h_top a").on('click', function(event) {
            $('.account_box textarea').val('');
            $('.bg_h').hide();
            $('.account_box').hide();
        })
        //配单反馈--确定
        $(".btn_confirm").on('click', function(event) {
            $.ajax({
                url: '',
                type: 'get',
                data: '',
                dataType:'json',
                success: function (data) {
                    layer.alert("复制报价成功!",{icon: 1});
                }
            });
        });

        //直接下单
        $(".tijiao").on('click', function(event) {
            window.location.href = '{{url('member/buyer/items/order')}}/{{$data['orders']['id']}}';
        });
    });

</script>
</body>
</html>